package com.yn.xgame;

import com.google.protobuf.GeneratedMessage;

/**
 * MqMessage
 * use MqBeanMessage indeed
 * Created by wangboo on 2017/7/11.
 */
@Deprecated
public class MqMessage implements IMessage {

    private String topic;
    private String tags;
    private Object messageId;
    private GeneratedMessage pb;

    public MqMessage(String topic, String tags, Object messageId, GeneratedMessage pb) {
        this.topic = topic;
        this.tags = tags;
        this.messageId = messageId;
        this.pb = pb;
    }

    public String getTopic() {
        return topic;
    }

    public String getTags() {
        return tags;
    }

    public <T> T getMessageId() {
        return (T) messageId;
    }

    public <Pb extends GeneratedMessage> Pb getPb() {
        return (Pb) pb;
    }
}
